<?php include("header.php"); ?>
<body>
<div class="widget-box">
  <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
    <h5>权限列表</h5>
  </div>
  <div class="widget-content nopadding">
    <table width="100%"  class="table table-bordered table-striped">
      <tbody>
       <tr>
        <?php 
			foreach ($list as $key=>$v) { 
				$txt .="<td>";
				$txt .="<a href=javascript:test('".$v["url"]."')><img src=".APP."/View/".$v["url"]." width='150' height='120'></a>";
				$txt .="</td>";
				if(($key+1)%3 == 0) $txt.="</tr>";
			 }
			 echo $txt;
		
		 ?>
      </tbody>
    </table>
  </div>
</div>
</body>
<script  type="text/javascript">
function test(src){
	
	var src="<?php echo APP ?>/View/"+src;
	var h = $(window).height();
	var w = $(window).width();
	$("#zoomWallpaper").attr("src",src).width(w).height(h);
	$("#zoomWallpaperGrid").width(w).height(h);

	alert(win);	
}
//$.ajax({
//	type:'post',//可选
//	url:'<?php echo ACT ?>/Index/wallinit',//这里是接收数据的PHP程序
//	data:'ac=wallpaper_init',//传给PHP的数据，多个参数用&连接
//	dataType:'text',//服务器返回的数据类型 可选XML ,Json jsonp script html text等
//	cache: false,        
//	async: false,		
//	success:function(msg){//这里是ajax提交成功后，PHP程序返回的数据处理函数。msg是返回的数据，数据类型在dataType参数里定义！
//			var src="<?php echo APP ?>/View/"+trim(msg);
//			var h = $(window).height();
//			var w = $(window).width();
//			$("#zoomWallpaper").attr("src",src).width(w).height(h);
//			$("#zoomWallpaperGrid").width(w).height(h);
//	}
//});

</script>